<?php foreach ($sections as $section) :?>
    <li class="closed">
        <span class="folder"><?php echo $section->getTitle() ?></span>
        <ul>
            <li class="closed">
                <span class="folder">Contenidos</span>
                <ul>
                    <?php include_partial('portal/treeLeafs',
                        array('contents' => $section->getContents()))
                    ?>
                </ul>
            </li>
        </ul>
        <?php if ($section->getHasSubsection() == 1): ?>
            <ul>
                <?php include_partial('portal/tree',
                    array('sections' => $section->getSectionChilds()))
                ?>
            </ul>
        <?php endif; ?>
    </li>
<?php endforeach ?>